<!--
  This file is a part of the open-eBackup project.
  This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0.
  If a copy of the MPL was not distributed with this file, You can obtain one at
  http://mozilla.org/MPL/2.0/.
  
  Copyright (c) [2024] Huawei Technologies Co.,Ltd.
  
  THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND,
  EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT,
  MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE.
  -->


<!DOCTYPE html
  PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html lang="en-us" xml:lang="en-us">
<head>
      <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
   
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="DC.Type" content="topic">
<meta name="DC.Title" content="Encrypting a Plaintext Private Key File">
<meta name="DC.Format" content="XHTML">
<meta name="DC.Identifier" content="EN-US_TOPIC_0000001829819537">
<meta name="DC.Language" content="en-us">
<link rel="stylesheet" type="text/css" href="public_sys-resources/commonltr.css">
<title>Encrypting a Plaintext Private Key File</title>
</head>
<body style="clear:both; padding-left:10px; padding-top:5px; padding-right:5px; padding-bottom:5px"><a name="EN-US_TOPIC_0000001829819537"></a><a name="EN-US_TOPIC_0000001829819537"></a>

<h1 class="topictitle1">Encrypting a Plaintext Private Key File</h1>
<div id="body0000001188432547"><p id="EN-US_TOPIC_0000001829819537__en-us_topic_0000001506026093_en-us_topic_0000001456649200_p8060118">When updating the <strong id="EN-US_TOPIC_0000001829819537__b1067310583289"><span id="EN-US_TOPIC_0000001829819537__text182371271917"><strong>Server Certificate</strong></span></strong> or <strong id="EN-US_TOPIC_0000001829819537__b19361024298"><span id="EN-US_TOPIC_0000001829819537__text870514511191"><strong>Internal communication Certificate</strong></span></strong>, ensure that the imported private key file is encrypted. This section describes how to use the OpenSSL tool to encrypt a plaintext private key file.</p>
<div class="section" id="EN-US_TOPIC_0000001829819537__en-us_topic_0000001506026093_en-us_topic_0000001456649200_section11186181274116"><h4 class="sectiontitle">Prerequisites</h4><p id="EN-US_TOPIC_0000001829819537__en-us_topic_0000001506026093_en-us_topic_0000001456649200_p149911504115">The OpenSSL tool has been installed on the local maintenance terminal.</p>
</div>
<div class="section" id="EN-US_TOPIC_0000001829819537__en-us_topic_0000001506026093_en-us_topic_0000001456649200_section95701193413"><h4 class="sectiontitle">Procedure</h4><ol id="EN-US_TOPIC_0000001829819537__en-us_topic_0000001506026093_en-us_topic_0000001456649200_ol6616192184218"><li id="EN-US_TOPIC_0000001829819537__en-us_topic_0000001506026093_en-us_topic_0000001456649200_li2616142134210"><span>In the directory where the plaintext private key is stored, run the following command to encrypt the plaintext private key:</span><p><pre class="screen" id="EN-US_TOPIC_0000001829819537__en-us_topic_0000001506026093_en-us_topic_0000001456649200_screen8353115184210">openssl rsa -aes256 -in<em id="EN-US_TOPIC_0000001829819537__en-us_topic_0000001506026093_en-us_topic_0000001456649200_i1546519604318"> arg1</em> -out <em id="EN-US_TOPIC_0000001829819537__en-us_topic_0000001506026093_en-us_topic_0000001456649200_i2537597438">arg2</em></pre>
<p id="EN-US_TOPIC_0000001829819537__en-us_topic_0000001506026093_en-us_topic_0000001456649200_p594224715432">In the preceding command, <em id="EN-US_TOPIC_0000001829819537__i4096295827522">arg1</em> indicates the name of the original private key file, and <em id="EN-US_TOPIC_0000001829819537__i15325517277522">arg2</em> indicates the name of the encrypted private key file.</p>
</p></li><li id="EN-US_TOPIC_0000001829819537__en-us_topic_0000001506026093_en-us_topic_0000001456649200_li1669311513432"><span>Enter the encryption password twice as prompted.</span></li></ol>
</div>
</div>

<div class="hrcopyright"><hr size="2"></div><div class="hwcopyright">Copyright &copy; Huawei Technologies Co., Ltd.</div></body>
</html>